package algorithm.common;

import java.util.Scanner;

/**
 * @Author: Hevery
 * @Description:
 * @Date: Created on 2017/9/10
 * @Modified By:
 */
public class Main10 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        char[] chars = str.toCharArray();
        int cnt[] = new int[26];
        for (int i = 0; i < chars.length; i++) {
            cnt[chars[i]%26]++;
        }
        int res = cnt[0];
        for (int i = 1;i<26;i++){
            if (cnt[i]>res){
                res = cnt[i];
            }
        }
        System.out.println(res);
    }

}
